#!/usr/bin/python
# -*- coding: UTF-8 -*-

import math

n = 1
a = 0

while a <= 1000:
	n = n + 1
	a = math.factorial(n)
print "1000, n =",(n-1)


while a <= (1000 * 60):
	n = n + 1
	a = math.factorial(n)
print "1000 * 60, n =",(n-1)


while a <= (1000 * 60 * 60):
	n = n + 1
	a = math.factorial(n)
print "1000 * 60 * 60, n =",(n-1)
